function ModuleDialogDeadlineChange(doc, container, width, height, user, date, options) {
  this._doc = doc;
  this._container = container;
  this._width = width;
  this._height = height;
  this._user = user;
  this._date = date;
  this._options = options;
  
  this._object = (options && options.object) ? options.object : null;
  this._popupBox = new ModulePopupBoxSimple();
  
  this._createElements();
};

ModuleDialogDeadlineChange.prototype._createElements = function() {
  var _self = this;
  this._gui = new DialogDeadlineChange(this._doc, this._container, this._width, this._height, this._user, this._date, this._options)._gui;
  
  this._gui.input.value = (this._object.deadline) ? SimpleDate.format(SimpleDate.fromStamp(this._object.deadline)) : '';
  this._gui.input.onclick = function() { var context = this;
                                            _self._changeDate.call(_self, this, SimpleDate.fromStamp(_self._object.deadline), function(sd) { _self._object.deadline = SimpleDate.toStamp(sd); context.focus(); }, false);
                                            return false;
                                          };

};

ModuleDialogDeadlineChange.prototype._changeDate = function(label, currentDate, onChangeFunc, showTime) {
  var _self = this;
  this._wContainer = document.createElement('div');
  this._wContainer.style.left = DOMUtils.findPos(label)[0] + 'px';
  this._wContainer.style.top = DOMUtils.findPos(label)[1] + 'px';
  this._popupBox._open(this._wContainer, { pos: DOMUtils.findPos(label) });
  
  var ds = new DateSelect(currentDate, null, { container: this._wContainer, showTime: showTime });
  ds._selectFunc = function(sd) { _self._selectDate.call(_self, sd, label, onChangeFunc, showTime); };
};

ModuleDialogDeadlineChange.prototype._selectDate = function(sd, label, onChangeFunc, showTime) {
  
  onChangeFunc(sd);
  this._showDate(sd, label, showTime);
  this._popupBox._close();
};

ModuleDialogDeadlineChange.prototype._showDate = function(sd, label, showTime) {
  if (sd) { 
    label.value = SimpleDate.format(sd, showTime);
  } else {
    label.value = '';
  }
};